package com.ruoyi.common.utils.changeUtils;

public class FTfontChangeUtils {
    /**
     * 调用该API ,请去掉小数点及小数点后面的内容
     * @param price
     * @return
     */
    public static String[] changeFont(String price){
        String [] allFFonts = {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖","拾"};
        char[] priceChars = new char[price.length()];
        String[] resultePrice = {"零","零","零","零","零"};
        int j = -1;
        for (int i = price.length(); i>0;i--){
            j++;
            String c = price.charAt(i-1)+"";
            int num = Integer.parseInt(c);
            String s = allFFonts[num];
            resultePrice[resultePrice.length-1-j]=s;
        }
        return resultePrice;
    }

    public static void main(String[] args) {
        String[] strings = changeFont("26");
        for (String s: strings){
            System.out.println(s);
        }
    }
}
